/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __GBUILD_APPLICATION_H__
#define __GBUILD_APPLICATION_H__

#include <QtGui/QApplication>

#include "MainWindow.h"

namespace PQBuilder
{
	class BuilderApplication
	{
	public:
		static const QString OWNER_NAME;//owner of the software
		static const QString APPLICATION_NAME;
		static const QString STATE_FILE_NAME;//application state file name
	protected:
		BuilderApplication();
	public:
		~BuilderApplication();
		static BuilderApplication& getSingleton();
		void init(int argc, char **argv);
		void run();

		void loadProject(QString name);

	private:
		void initStyleSheet();
		void initLanguage();
		void initSplashScreen();
	private:
		QApplication* _application;
		MainWindow* _mainWindow;

	};

}
//Bd short for builder while Ng short for engine
#define GBApplication PQBuilder::BuilderApplication::getSingleton()

#endif
